home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 6
/
CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso
/
cucd
/
readers
/
utils
/
gui4cli
/
ginstall.gc
< prev
next >
Wrap
Text File
|
1996-10-28
|
4KB
|
180 lines
G4C
; This is a program for the installation of Gui4Cli to your system.
; Comodore's Installer, would do a better job, but since I don't
; know how to write scripts for it, and since this is an other
; excuse for making a gui, here it is.
; If you have any problems (God forbid), just install it by hand.
; Instructions are in the Read.me file
WinBig -1 -1 300 105 "Install Gui4Cli"
WinType 11110001
WinOut "con:0/12/400/80/Gui4Cli Installation/CLOSE/AUTO/WAIT"
usetopaz
Line 0 59 300 59 2
Line 0 60 300 60 3
Line 0 61 300 61 1
Line 0 80 300 80 2
Line 0 81 300 81 3
Line 0 82 300 82 1
;--------------------------------- Start up events --------------------
; On loading, we check for the Copy, Assign and Makedir commands
; which we'll need - if not found, inform user & exit
xOnLoad
extract GInstall.gc GUIPATH gi_path
cd $gi_path
ifexists file Gui4Cli
; ok
else
ezreq "I'm not in the correct directory\nPlease guide me inside the Gui4Cli directory" "BROWSE..|CANCEL" gi_ask
if $gi_ask = 0
GuiQuit GInstall.gc
Stop
else
setvar gi_ask ""
reqfile -1 -1 250 -60 "Inside the Gui4Cli Dir." DIR gi_ask $gi_path
if $gi_ask = ""
GuiQuit GInstall.gc
Stop
endif
CD $gi_ask
ifexists FILE Gui4Cli
;
else
ezreq "Gui4Cli not found..\nPlease install manually" 'OK' ""
GuiQuit GInstall.gc
Stop
endif
endif
endif
setvar gi_dir SYS:Gui4Cli
setvar gi_assign ON
setvar gi_dirmake YES
ifexists assign GUIs
if guis: F= $gi_path
;
else
setvar gi_dirmake NO
setvar gi_dir GUIs:
setvar gi_assign OFF
update ginstall.gc 7 0
update ginstall.gc 2 "Directory exists."
endif
endif
GuiOpen GInstall.gc
update ginstall.gc 1 $gi_dir
xOnQuit
delvar gi_#?
xOnClose
GuiQuit GInstall.gc
;------------------------------ Install Gui4Cli program -----------------
CTEXT 10 15 "Gui4Cli Installation" topaz.font 8 2 0 000
xBUTTON 200 4 80 14 "Browse.."
SetVar gi_gdir ""
ReqFile -1 -1 250 -60 "Choose Dir for Gui4Cli" DIR gi_gdir $gi_dir
if $gi_gdir != ""
joinfile $gi_gdir Gui4Cli gi_dir
ifexists DIR $gi_dir
setvar gi_dirmake NO
setvar gi_assign OFF
update ginstall.gc 7 0
update ginstall.gc 2 "Directory Gui4Cli exists"
else
setvar gi_dirmake YES
setvar gi_assign ON
update ginstall.gc 7 1
update ginstall.gc 2 "Will create Directory Gui4Cli"
endif
update ginstall.gc 1 $gi_dir
endif
TEXT 10 20 280 14 "sys:" 120 BOX
GadID 1
TEXT 10 35 280 14 "Creates Directory named Gui4Cli" 60 NOBOX
GadID 2
TEXT 10 45 280 14 "Gui and Grx will be copied to c:" 50 NOBOX
GadID 3
;====================> Assign GUIs:
TEXT 10 65 150 14 "Assign GUIs: in User-Startup?" 30 NOBOX
GadID 4
xCHECKBOX 260 65 27 11 "" gi_assign "ON" "OFF" ON
gadID 7
;----------------------- Run Install -------------------------------
xButton 10 88 100 14 Install!
SetWinTitle GInstall.gc "Installing..."
FailAt 10
; copy Gui & Grx
action copy gui c:
action copy grx c:
update ginstall.gc 3 "Gui & Grx copied."
; Make G4C dir
if $gi_dirmake = YES
makedir $gi_dir
update ginstall.gc 2 "Gui4Cli dir created."
endif
; add the assign to s:user-startup
if $gi_assign = ON
update GInstall.gc 4 "Assigning..."
Append s:user-startup "\n;START of Gui4Cli assign\n"
Append s:user-startup 'assign GUIs: $gi_dir \n'
Append s:user-startup ";END of Gui4Cli assign\n"
Assign GUIs: $gi_dir
update GInstall.gc 4 "GUIs: Assign added."
endif
; copy the files
update GInstall.gc 1 "Copying files..."
copy #? $gi_dir
update GInstall.gc 1 "Copying fonts..."
copy fonts/#? fonts:
update GInstall.gc 1 "Gui4Cli Installed."
SetWinTitle GInstall.gc "Gui4Cli Installation"
ezreq "Installation finished.\nGui4Cli can be found in $gi_dir" "You don't say.." ""
GuiQuit GInstall.gc
;------------> On failing
xOnFail
SetWinTitle GInstall.gc "**** ERROR ****"
EZREQ "ERROR in installation\nPlease read the ReadMe.Now file\nand install manually." "OK" ""
GuiQuit GInstall.gc
Stop
;----------------------- Cancel button ------------------------------
xBUTTON 185 88 100 14 CANCEL
GuiQuit GInstall.gc